<?php
include_once("php/ErrorHandler.php");
include_once("php/DbManager.php");
include_once("php/DbBridge.php");
ErrorHandler::setErrorHandling();
$db = new DbBridge();
$dbManager = new DbManager();
$db->connect();
$result = $dbManager->updateUser($db, $_POST);
if (!$result) {
	$errors = $dbManager->getErrors();
	echo json_encode($errors);
} else {
	echo json_encode($result);
}
$db->disconnect();
?>